package cn.liulingfengyu.behavioralpatterns.observerpattern;

/**
 * 具体观察者类
 */
public class ConcreteObserver implements Observer {
    private String name;

    public ConcreteObserver(String name) {
        this.name = name;
    }

    @Override
    public void update(String state) {
        System.out.println(name + " 收到通知，当前状态为: " + state);
    }
}